package cn.gson.crm.model.mapper;

import cn.gson.crm.model.pojos.Customer;
import cn.gson.crm.model.pojos.MoneyBackPlan;
import cn.gson.crm.model.pojos.RefundRecord;
import cn.gson.crm.model.pojos.Shuliang;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RefundRecordMapper {
    //查询当前人下所有客户
    public List<Customer> selectcustomer(Integer yg);
    //查询当前登录人所有的回款记录
    public List<RefundRecord>  selectref(Integer rid);
    //通过客户id查询所有回款计划未回
    public List<MoneyBackPlan> selecthui(Integer cid);
    //回款多条件查询
    public List<RefundRecord> selectwhere(@Param("rid")Integer rid,@Param("where") String where);
    //时间查询
    public List<RefundRecord> selecttime(@Param("rid") Integer rid, @Param("statr") String statr, @Param("endtime") String endtime);
    //修改回款计划状态
    public void updatehui(Integer rid);
    //修改回款计划的回款id
    public void updatehuiid(@Param("rid")Integer rid,@Param("mid") Integer mid);
    //根据回款计划id查询此记录
    public List<MoneyBackPlan> selectm(Integer mid);
    //回款金额等于订单金额修改订单支付状态
    public void updateorder(Integer oid);
    public void updateordermoney(@Param("money") Integer money,@Param("oid") Integer oid);
    public List<RefundRecord> selectUU(Integer oid);
    public void updateorder2(Integer oid);

    //统计回款记录表
    public List<Shuliang> selectrefundRecord();
}
